<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
    <%@include file="common/head.jspf" %>
    <title>商家详情</title>
    <script src="js/pages/admin/shopdetail.js"></script>
</head>
<body>

<%@include file="common/navbar.jspf" %>
<div class="container">
    <div class="row">
        <div class="col-md-3">
            <%@include file="common/sidebar.jspf" %>
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">
                    商家详情
                    <div class="pull-right">
                        <button class="btn btn-success btn-xs" type="button" id="submitbtn">&nbsp;&nbsp;&nbsp;&nbsp;保存修改&nbsp;&nbsp;&nbsp;&nbsp;</button>
                    </div>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal" method="post" action="./adm/modifyshop">
                        <input type="hidden" name="id" value="<c:out value="${shop.id}"/>"/>

                        <div class="form-group">
                            <label class="control-label col-md-2">名称</label>

                            <div class="col-md-10">
                                <input class="form-control" type="text" name="name" id="name"
                                       value="<c:out value="${shop.name}"/>"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2">描述</label>

                            <div class="col-md-10">
                                <textarea class="form-control" name="description" id="description"><c:out
                                        value="${shop.description}"/></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2">联系电话</label>

                            <div class="col-md-10">
                                <input class="form-control" type="text" name="con" id="con"
                                       value="<c:out value="${shop.con}"/>"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2">地址</label>

                            <div class="col-md-10">
                                <input class="form-control" type="text" name="location" id="location"
                                       value="<c:out value="${shop.location}"/>"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2">营业时间</label>

                            <div class="col-md-10">
                                <input class="form-control" type="text" name="bh" id="bh"
                                       value="<c:out value="${shop.bh}"/>"/>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    服务列表
                    <div class="pull-right">
                        <a class="btn btn-success btn-xs" href="./adm/servicedetail?shop=<c:out value="${shop.id}"/>">&nbsp;&nbsp;&nbsp;&nbsp;新增服务&nbsp;&nbsp;&nbsp;&nbsp;</a>
                    </div>
                </div>
                <table class="table table-bordered table-striped">
                    <thead>
                    <tr>
                        <th>服务名称</th>
                        <th>积分</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach var="l" items="${service}">
                        <tr>
                            <td><a href="./adm/servicedetail?id=<c:out value="${l.id}"/>"><c:out
                                    value="${l.tag1}"/></a></td>
                            <td><c:out value="${l.creditcost}"/></td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
</html>
